package com.zoroki.hmusic.service;

import com.zoroki.hmusic.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Page;
import org.springframework.data.elasticsearch.core.SearchHits;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zoroki
 * @since 2023-05-10
 */
public interface IUserService extends IService<User> {

    User findUserByColumn(String columnName,Object odd);

    int addUser(User user);

    int updateUser(User user);

    List<User> findUserBySearStr(String searchStr);

    SearchHits<User> findUserByKeyword(String keyword);
    Page<User> getUserPageByKeyword(String keyword,int pageIndex);

    int deleteUserById(int id);

    User findUserById(int id);

    User findUserByPlaylistId(int playlistId);

    int editPasswordByEmail(String email, String password);

    User getUserByEmail(String email);
}
